#include "firstwidget.h"
#include "ui_firstwidget.h"
#include "secondwiget.h"

firstWidget::firstWidget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::firstWidget)
{
    ui->setupUi(this);
}

firstWidget::~firstWidget()
{
    delete ui;
}


void firstWidget::on_pushButton_clicked()
{
    secondWiget *s = new secondWiget(this);
    s->setWindowFlags(Qt::Dialog);
    s->setWindowModality(Qt::WindowModal);
    s->show();
    this->hide();
}

